── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.4.4 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.0
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dodgr)library(osmextract)
Data (c) OpenStreetMap contributors, ODbL 1.0. https://www.openstreetmap.org/copyright.
Check the package website, https://docs.ropensci.org/osmextract/, for more details.
library(sf)
Linking to GEOS 3.11.2, GDAL 3.7.2, PROJ 9.3.0; sf_use_s2() is TRUE
library(tmap)
Breaking News: tmap 3.x is retiring. Please test v4, e.g. with
remotes::install_github('r-tmap/tmap')
The following code uses some functions compiled in the MinorRoadTraffic repository prepared by Malcolm Morgan and follows the process described in this vignette of the same package.
# remotes::install_github("ITSLeeds/MinorRoadTraffic") # if not installedlibrary(MinorRoadTraffic)
Downloading data
osm_raw <-oe_get("East Yorkshire with Hull",extra_tags =c("ref", "highway", "junction", "maxspeed"))
The input place was matched with: East Yorkshire with Hull
The chosen file was already detected in the download directory. Skip downloading.
The corresponding gpkg file was already detected. Skip vectortranslate operations.
Reading layer `lines' from data source
`C:\Users\ts18jpf\Documents\OSMEXT_downloads\geofabrik_east-yorkshire-with-hull-latest.gpkg'
using driver `GPKG'
Simple feature collection with 77201 features and 12 fields
Geometry type: LINESTRING
Dimension: XY
Bounding box: xmin: -4.03885 ymin: 51.265 xmax: 4.364931 ymax: 58.67265
Geodetic CRS: WGS 84
Clipping road network
The count data will be used to clip the road network.
Reading layer `grouped_counts' from data source
`C:\Users\ts18jpf\OneDrive - University of Leeds\02_MsC\99_GEOG5099M_Dissertation\GEOG5099_Analysis\03_preprocessing_files\grouped_counts.geojson'
using driver `GeoJSON'
Simple feature collection with 588 features and 4 fields
Geometry type: POINT
Dimension: XY
Bounding box: xmin: 505930.6 ymin: 428325.3 xmax: 513352.9 ymax: 433636.7
Projected CRS: OSGB36 / British National Grid